﻿<?xml version="1.0" encoding="utf-8"?>
<!-- Defines types for pattern-enforcer-config and for architecture-explorer-config schemas -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType name="Config">
    <xs:annotation>
      <xs:documentation>
        The root element of Pattern Enforcer configuration.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="plugins" type="AssembliesList" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AssembliesList">
    <xs:annotation>
      <xs:documentation>
        The list of assemblies that will be loaded as plugins into Pattern Enforcer. 
        These assemblies are expected to contain custom design patterns definitions and 
        plugins registered via MEF.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="assembly" type="Assembly" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Assembly">
    <xs:annotation>
      <xs:documentation>
        Assembly with patterns definitions or pluging. 
        The filename attribute can be either full path, 
        or relative to the directory from which 
        Pattern Enforcer was run. 
      </xs:documentation>
    </xs:annotation>    
    <xs:attribute name="filename" use="required" type="xs:string"/>
  </xs:complexType>
</xs:schema>
